SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE Procedure [dbo].[TvShow_Get_EpisodeBySeason]
@SeasonId INT, @TvId INT
AS
--Declare @SeasonId INT, @Season INT, @TvId INT
--SET @TvId = 1182
--SET @SeasonId = 2347
select e.SeasonId, EpisodeId as EpisodeNumber, e.Title, e.Rating, e.AirDate from tvshow_episodes e
left join tvshow_seasons s on e.SeasonId = s.SeasonId
Where e.TvId = @TvId and e.SeasonId = @SeasonId
GO
